<?php
// +---------------------------------------------------------------------------+
// | This file is part of the KnowledgebasePublisher package                   |
// | KnowledgebasePublisher - web based knowledgebase publisher tool           |
// |                                                                           |
// | Author:  Evgeny Leontev <eleontev@gmail.com>                              |
// | Copyright (c) 2005 Evgeny Leontev                                         |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code.                          |
// +---------------------------------------------------------------------------+

require_once 'core/app/AppAjax.php';
require_once 'core/common/CommonEntryView.php';


class BulkFileEntryView_one extends AppView
{
	
	var $template = 'form_one.html';
	
	function execute(&$obj, &$manager) {
		
		$this->addMsg('user_msg.ini');
		
		$tpl = &new tplTemplatez($this->template_dir . $this->template);
		$tpl->tplAssign('error_msg', AppMsg::errorBox($obj->errors, $this->controller->module));
		
		if($obj->error) {
			$tpl->tplAssign('error_msg', $obj->error);
		}
		
		// categories
		FileEntryView_common::parseCategories($obj, $manager, $tpl);		
		
		// member roles
		if($manager->isExtra('private')) {
			require_once APP_EXTRA_MODULE_DIR . 'private/PrivateFile.php';
			PrivateFile::getFormStaff($tpl, $manager);
		}
		
		$tpl->tplAssign($this->setCommonFormVars($obj));
		$tpl->tplAssign($this->setStatusFormVars($obj->get('active')));
		$tpl->tplAssign($obj->get());
		$tpl->tplAssign($this->msg);
		
		$tpl->tplParse();
		return $tpl->tplPrint(1);
	}
}
?>